<html>
  <head>
    <title>Flag icomatics : dynamic image displaying a flag</title>
    <style type="text/css">
      html, html * { font-family: Courier New; }
      b i { font-style:italic; font-weight:bold; }
    </style>
    <script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
    <script type="text/javascript" src="http://ap2cu.com/res/js/stat.js"></script>
    <script type="text/javascript" src="http://ap2cu.com/res/js/jquery.js"></script>
    <link type="text/css" href="http://ap2cu.com/res/css/common.css" rel="stylesheet"/>
    <script>
    function generateFlag() {
      var country = $("#generator select[name='country']").val();
      var size = $("#generator input[name='size']:checked").val();
      var type = $("#generator input[name='type']:checked").val();
    	$("#flag img").attr("src","http://ap2cu.com/tools/icomatics/flags/?country="+country+"&size="+size+"&type="+type);
    }
    </script>
  </head>
  <body>
    <h1>How to use Flag icomatics ?</h1>
    <h2>URL</h2>
    The service is available at the following URL: <a href="http://ap2cu.com/tools/icomatics/flags">http://ap2cu.com/tools/icomatics/flags</a>
    <br/><br/>
    <h2>Parameters</h2>
    Three parameters are available:
    <ul>
      <li><u><b><i>country</i></b></u>: the <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO-3166-1 alpha-2</a> country code, on 2 characters.<br/><b><i>__</i></b> is the default value, meaning <b><i>"unknown country"</i></b>.<br/><br/></li>
      <li><u><b><i>size</i></b></u>: the size of the flag.<br/>3 values are available: <b><i>small</i></b>, <b><i>normal</i></b>, <b><i>big</i></b>.<br/><b><i>normal</i></b> is the default value.<br/><br/></li>
      <li><u><b><i>type</i></b></u>: the format of the image.<br/>3 values are available: <b><i>PNG</i></b>, <b><i>GIF</i></b> and <b><i>JPEG</i></b>.<br/><b><i>PNG</i></b> is the default value.<br/><br/></li>
    </ul>
    <h2>Examples</h2>
    <ol>
      <li>
        Big French Flag in JPEG:<br/>
        <table>
          <tr>
            <td><img src="http://ap2cu.com/tools/icomatics/flags/?country=FR&size=big&type=JPEG" alt="France" /></td>
            <td>&#160;&#160;&#160;</td>
            <td>&lt;img src="http://ap2cu.com/tools/icomatics/flags/?<b><i>country</i>=FR</b>&<b><i>size</i>=big</b>&<b><i>type</i>=JPEG</b>" alt="France" /></td>
          </tr>
        </table>
        <br/>
      </li>
      <li>
        Normal US Flag in GIF:<br/>
        <table>
          <tr>
            <td><img src="http://ap2cu.com/tools/icomatics/flags/?country=US&type=GIF" alt="US" /></td>
            <td>&#160;&#160;&#160;</td>
            <td>&lt;img src="http://ap2cu.com/tools/icomatics/flags/?<b><i>country</i>=US</b>&<b><i>type</i>=GIF</b>" alt="US" /></td>
          </tr>
        </table>
        <br/>
      </li>
      <li>
        Small Spain Flag in PNG:<br/>
        <table>
          <tr>
            <td><img src="http://ap2cu.com/tools/icomatics/flags/?country=ES&size=small" alt="Spain" /></td>
            <td>&#160;&#160;&#160;</td>
            <td>&lt;img src="http://ap2cu.com/tools/icomatics/flags/?<b><i>country</i>=ES</b>&<b><i>size</i>=small</b>" alt="Spain" /></td>
          </tr>
        </table>
        <br/>
      </li>
      <li>
        Default Flag:<br/>
        <table>
          <tr>
            <td><img src="http://ap2cu.com/tools/icomatics/flags" alt="Default" /></td>
            <td>&#160;&#160;&#160;</td>
            <td>&lt;img src="http://ap2cu.com/tools/icomatics/flags" alt="Default" /></td>
          </tr>
        </table>
      </li>
    </ol>
    <br/>
    <h2>Generate your flag</h2>
    <form id="generator" action="javascript:void(0)" onsubmit="generateFlag()">
      <table>
        <tr>
          <td valign="top">
            <b><u>Country</u> :</b><br/><br/><input type="submit" value="Generate"/>
          </td>
          <td>&#160;&#160;&#160;</td>
          <td valign="top">
            <select name="country">
              <option value="__" selected="selected">Default (unknown country)</option>
              <option value="AD">AD (Andorra)</option>
              <option value="AE">AE (United Arab Emirates)</option>
              <option value="AF">AF (Afghanistan)</option>
              <option value="AG">AG (Antigua and Barbuda)</option>
              <option value="AI">AI (Anguilla)</option>
              <option value="AL">AL (Albania)</option>
              <option value="AM">AM (Armenia)</option>
              <option value="AN">AN (Netherlands Antilles)</option>
              <option value="AO">AO (Angola)</option>
              <option value="AQ">AQ (Antarctica)</option>
              <option value="AR">AR (Argentina)</option>
              <option value="AS">AS (American Samoa)</option>
              <option value="AT">AT (Austria)</option>
              <option value="AU">AU (Australia)</option>
              <option value="AW">AW (Aruba)</option>
              <option value="AZ">AZ (Azerbaijan)</option>
              <option value="BA">BA (Bosnia and Herzegovina)</option>
              <option value="BB">BB (Barbados)</option>
              <option value="BD">BD (Bangladesh)</option>
              <option value="BE">BE (Belgium)</option>
              <option value="BF">BF (Burkina Faso)</option>
              <option value="BG">BG (Bulgaria)</option>
              <option value="BH">BH (Bahrain)</option>
              <option value="BI">BI (Burundi)</option>
              <option value="BJ">BJ (Benin)</option>
              <option value="BM">BM (Bermuda)</option>
              <option value="BN">BN (Brunei Darussalam)</option>
              <option value="BO">BO (Bolivia)</option>
              <option value="BR">BR (Brazil)</option>
              <option value="BS">BS (Bahamas)</option>
              <option value="BT">BT (Bhutan)</option>
              <option value="BW">BW (Botswana)</option>
              <option value="BY">BY (Belarus)</option>
              <option value="BZ">BZ (Belize)</option>
              <option value="CA">CA (Canada)</option>
              <option value="CD">CD (Congo, Democratic Republic)</option>
              <option value="CF">CF (Central African Republic)</option>
              <option value="CG">CG (Congo)</option>
              <option value="CH">CH (Switzerland)</option>
              <option value="CI">CI (Cote d'Ivoire)</option>
              <option value="CK">CK (Cook Islands)</option>
              <option value="CL">CL (Chile)</option>
              <option value="CM">CM (Cameroon)</option>
              <option value="CN">CN (China)</option>
              <option value="CO">CO (Colombia)</option>
              <option value="CR">CR (Costa Rica)</option>
              <option value="CU">CU (Cuba)</option>
              <option value="CV">CV (Cape Verde)</option>
              <option value="CY">CY (Cyprus)</option>
              <option value="CZ">CZ (Czech Republic)</option>
              <option value="DE">DE (Germany)</option>
              <option value="DJ">DJ (Djibouti)</option>
              <option value="DK">DK (Denmark)</option>
              <option value="DM">DM (Dominica)</option>
              <option value="DO">DO (Dominican Republic)</option>
              <option value="DZ">DZ (Algeria)</option>
              <option value="EC">EC (Ecuador)</option>
              <option value="EE">EE (Estonia)</option>
              <option value="EG">EG (Egypt)</option>
              <option value="EH">EH (Western Sahara)</option>
              <option value="ER">ER (Eritrea)</option>
              <option value="ES">ES (Spain)</option>
              <option value="ET">ET (Ethiopia)</option>
              <option value="FI">FI (Finland)</option>
              <option value="FJ">FJ (Fiji)</option>
              <option value="FK">FK (Falkland Islands (Malvinas))</option>
              <option value="FM">FM (Micronesia)</option>
              <option value="FO">FO (Faroe Islands)</option>
              <option value="FR">FR (France)</option>
              <option value="GA">GA (Gabon)</option>
              <option value="GB">GB (United Kingdom)</option>
              <option value="GD">GD (Grenada)</option>
              <option value="GE">GE (Georgia)</option>
              <option value="GF">GF (French Guiana)</option>
              <option value="GG">GG (Guernsey)</option>
              <option value="GH">GH (Ghana)</option>
              <option value="GI">GI (Gibraltar)</option>
              <option value="GL">GL (Greenland)</option>
              <option value="GM">GM (Gambia)</option>
              <option value="GN">GN (Guinea)</option>
              <option value="GP">GP (Guadeloupe)</option>
              <option value="GQ">GQ (Equatorial Guinea)</option>
              <option value="GR">GR (Greece)</option>
              <option value="GT">GT (Guatemala)</option>
              <option value="GU">GU (Guam)</option>
              <option value="GW">GW (Guinea-Bissau)</option>
              <option value="GY">GY (Guyana)</option>
              <option value="HK">HK (Hong Kong)</option>
              <option value="HN">HN (Honduras)</option>
              <option value="HR">HR (Croatia)</option>
              <option value="HT">HT (Haiti)</option>
              <option value="HU">HU (Hungary)</option>
              <option value="ID">ID (Indonesia)</option>
              <option value="IE">IE (Ireland)</option>
              <option value="IL">IL (Israel)</option>
              <option value="IM">IM (Isle of Man)</option>
              <option value="IN">IN (India)</option>
              <option value="IQ">IQ (Iraq)</option>
              <option value="IR">IR (Iran)</option>
              <option value="IS">IS (Iceland)</option>
              <option value="IT">IT (Italy)</option>
              <option value="JE">JE (Jersey)</option>
              <option value="JM">JM (Jamaica)</option>
              <option value="JO">JO (Jordan)</option>
              <option value="JP">JP (Japan)</option>
              <option value="KE">KE (Kenya)</option>
              <option value="KG">KG (Kyrgyzstan)</option>
              <option value="KH">KH (Cambodia)</option>
              <option value="KI">KI (Kiribati)</option>
              <option value="KM">KM (Comoros)</option>
              <option value="KN">KN (Saint Kitts and Nevis)</option>
              <option value="KP">KP (Korea, Democratic People's Republic)</option>
              <option value="KR">KR (Korea, Republic of)</option>
              <option value="KW">KW (Kuwait)</option>
              <option value="KY">KY (Cayman Islands)</option>
              <option value="KZ">KZ (Kazakhstan)</option>
              <option value="LA">LA (Lao People's Democratic Republic)</option>
              <option value="LB">LB (Lebanon)</option>
              <option value="LC">LC (Saint Lucia)</option>
              <option value="LI">LI (Liechtenstein)</option>
              <option value="LK">LK (Sri Lanka)</option>
              <option value="LR">LR (Liberia)</option>
              <option value="LS">LS (Lesotho)</option>
              <option value="LT">LT (Lithuania)</option>
              <option value="LU">LU (Luxembourg)</option>
              <option value="LV">LV (Latvia)</option>
              <option value="LY">LY (Libyan Arab Jamahiriya)</option>
              <option value="MA">MA (Morocco)</option>
              <option value="MC">MC (Monaco)</option>
              <option value="MD">MD (Moldova, Republic of)</option>
              <option value="ME">ME (Montenegro)</option>
              <option value="MG">MG (Madagascar)</option>
              <option value="MH">MH (Marshall Islands)</option>
              <option value="MK">MK (Macedonia)</option>
              <option value="ML">ML (Mali)</option>
              <option value="MN">MN (Mongolia)</option>
              <option value="MO">MO (Macao)</option>
              <option value="MQ">MQ (Martinique)</option>
              <option value="MR">MR (Mauritania)</option>
              <option value="MS">MS (Montserrat)</option>
              <option value="MT">MT (Malta)</option>
              <option value="MU">MU (Mauritius)</option>
              <option value="MV">MV (Maldives)</option>
              <option value="MW">MW (Malawi)</option>
              <option value="MX">MX (Mexico)</option>
              <option value="MY">MY (Malaysia)</option>
              <option value="MZ">MZ (Mozambique)</option>
              <option value="NA">NA (Namibia)</option>
              <option value="NC">NC (New Caledonia)</option>
              <option value="NE">NE (Niger)</option>
              <option value="NF">NF (Norfolk Island)</option>
              <option value="NG">NG (Nigeria)</option>
              <option value="NI">NI (Nicaragua)</option>
              <option value="NL">NL (Netherlands)</option>
              <option value="NO">NO (Norway)</option>
              <option value="NP">NP (Nepal)</option>
              <option value="NR">NR (Nauru)</option>
              <option value="NZ">NZ (New Zealand)</option>
              <option value="OM">OM (Oman)</option>
              <option value="PA">PA (Panama)</option>
              <option value="PE">PE (Peru)</option>
              <option value="PF">PF (French Polynesia)</option>
              <option value="PG">PG (Papua New Guinea)</option>
              <option value="PH">PH (Philippines)</option>
              <option value="PK">PK (Pakistan)</option>
              <option value="PL">PL (Poland)</option>
              <option value="PR">PR (Puerto Rico)</option>
              <option value="PS">PS (Palestinian Territory, Occupied)</option>
              <option value="PT">PT (Portugal)</option>
              <option value="PW">PW (Palau)</option>
              <option value="PY">PY (Paraguay)</option>
              <option value="QA">QA (Qatar)</option>
              <option value="RE">RE (Reunion)</option>
              <option value="RO">RO (Romania)</option>
              <option value="RS">RS (Serbia)</option>
              <option value="RU">RU (Russian Federation)</option>
              <option value="RW">RW (Rwanda)</option>
              <option value="SA">SA (Saudi Arabia)</option>
              <option value="SB">SB (Solomon Islands)</option>
              <option value="SC">SC (Seychelles)</option>
              <option value="SD">SD (Sudan)</option>
              <option value="SE">SE (Sweden)</option>
              <option value="SG">SG (Singapore)</option>
              <option value="SI">SI (Slovenia)</option>
              <option value="SK">SK (Slovakia)</option>
              <option value="SL">SL (Sierra Leone)</option>
              <option value="SM">SM (San Marino)</option>
              <option value="SN">SN (Senegal)</option>
              <option value="SO">SO (Somalia)</option>
              <option value="SR">SR (Suriname)</option>
              <option value="ST">ST (Sao Tome and Principe)</option>
              <option value="SV">SV (El Salvador)</option>
              <option value="SY">SY (Syrian Arab Republic)</option>
              <option value="SZ">SZ (Swaziland)</option>
              <option value="TC">TC (Turks and Caicos Islands)</option>
              <option value="TD">TD (Chad)</option>
              <option value="TG">TG (Togo)</option>
              <option value="TH">TH (Thailand)</option>
              <option value="TJ">TJ (Tajikistan)</option>
              <option value="TK">TK (Tokelau)</option>
              <option value="TL">TL (Timor-Leste)</option>
              <option value="TM">TM (Turkmenistan)</option>
              <option value="TN">TN (Tunisia)</option>
              <option value="TO">TO (Tonga)</option>
              <option value="TR">TR (Turkey)</option>
              <option value="TT">TT (Trinidad and Tobago)</option>
              <option value="TV">TV (Tuvalu)</option>
              <option value="TW">TW (Taiwan, Province of China)</option>
              <option value="TZ">TZ (Tanzania, United Republic of)</option>
              <option value="UA">UA (Ukraine)</option>
              <option value="UG">UG (Uganda)</option>
              <option value="US">US (United States)</option>
              <option value="UY">UY (Uruguay)</option>
              <option value="UZ">UZ (Uzbekistan)</option>
              <option value="VA">VA (Holy See (Vatican City State))</option>
              <option value="VC">VC (Saint Vincent and the Grenadines)</option>
              <option value="VE">VE (Venezuela, Bolivarian Republic of)</option>
              <option value="VG">VG (Virgin Islands, British)</option>
              <option value="VI">VI (Virgin Islands, U.S.)</option>
              <option value="VN">VN (Viet Nam)</option>
              <option value="VU">VU (Vanuatu)</option>
              <option value="WS">WS (Samoa)</option>
              <option value="YE">YE (Yemen)</option>
              <option value="ZA">ZA (South Africa)</option>
              <option value="ZM">ZM (Zambia)</option>
              <option value="ZW">ZW (Zimbabwe)</option>
            </select>
            <br/><br/>
            <span id="flag"><img src="index.php5" alt=""/></span>
          </td>
          <td colspan="3">&#160;&#160;&#160;</td>
          <td valign="top"><b><u>Size</u> :</b></td>
          <td>&#160;&#160;&#160;</td>
          <td valign="top" align="right">
            <label>Small <input type="radio" name="size" value="small"/></label><br/>
            <label>Normal <input type="radio" name="size" value="normal" checked="checked"/></label><br/>
            <label>Big <input type="radio" name="size" value="big"/></label><br/>
          </td>
          <td>&#160;&#160;&#160;</td>
          <td valign="top"><b><u>Type</u> :</b></td>
          <td>&#160;&#160;&#160;</td>
          <td valign="top" align="right">
            <label>PNG <input type="radio" name="type" value="png" checked="checked"/></label><br/>
            <label>GIF <input type="radio" name="type" value="gif"/></label><br/>
            <label>JPEG <input type="radio" name="type" value="jpeg"/></label><br/>
          </td>
        </tr>
      </table>
    </form>
  </body>
</html>